//
//  TranslationModel.m
//  语音翻译合成Demo
//
//  Created by 王鹏宇 on 2018/3/1.
//  Copyright © 2018年 王鹏宇. All rights reserved.
//

#import "TranslationModel.h"

@implementation TranslationModel

- (instancetype)initWithCoder:(NSCoder *)coder {
    
    self = [super init];
    if (self) {
        
        self.languageStr = [coder decodeObjectForKey:@"languageStr"];
        self.translationStr = [coder decodeObjectForKey:@"translationStr"];
        self.toLanguageType = [coder decodeObjectForKey:@"toLanguageType"];
        
        self.languageType = [coder decodeObjectForKey:@"languageType"];
        self.language_local = [coder decodeObjectForKey:@"language_local"];
        self.directionNum = [coder decodeIntegerForKey:@"directionNum"];
        
        self.icon = [coder decodeObjectForKey:@"icon"];
    }
    return self;
}


- (void)encodeWithCoder:(NSCoder *)coder {

    [coder encodeObject:self.languageStr forKey:@"languageStr"];
    [coder encodeObject:self.translationStr forKey:@"translationStr"];
    [coder encodeObject:self.toLanguageType forKey:@"toLanguageType"];
    
    [coder encodeObject:self.languageType forKey:@"languageType"];
    [coder encodeObject:self.language_local forKey:@"language_local"];
    [coder encodeInteger:self.directionNum forKey:@"directionNum"];
    
    [coder encodeObject:self.icon forKey:@"icon"];
}



@end
